class ExamResult {
  String examName;
  DateTime submitPaperTime;
  bool isPass;
  bool isRepairExam;
  double sumScore;
  int quesError;
  int quesNull;
  int quesRight;
  int duration;
  double grade;
  dynamic listResult;

  ExamResult({
    this.examName,
    this.submitPaperTime,
    this.isPass,
    this.isRepairExam,
    this.sumScore,
    this.quesError,
    this.quesNull,
    this.quesRight,
    this.duration,
    this.grade,
    this.listResult,
  });

  factory ExamResult.fromJson(Map<String, dynamic> json) {
    return ExamResult(
      examName: json['examName'],
      submitPaperTime: json['submitPaperTime'] == null ? null : DateTime.parse(json['submitPaperTime']),
      isPass: json['isPass'] == 1 ? true : false,
      isRepairExam: json['isRepairExam'],
      sumScore: json['sumScore'],
      quesError: json['quesError'],
      quesNull: json['quesNull'],
      quesRight: json['quesRight'],
      listResult: json['listResult'],
      grade: json['grade'],
      duration: json['duration']
    );
  }
}
